package com.ucode.cgms.mapper;

import com.ucode.model.cgms.CgmsGiftRewardOrder;
import com.ucode.springboot.starter.mybatis.core.base.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * 礼物打赏订单Mapper
 * @Author: liliang
 * @Date: 2025/5/11 22:39
 * @Version: 1.0
 */
@Mapper
public interface CgmsGiftRewardOrderMapper extends BaseMapper<CgmsGiftRewardOrder, Long> {
    /**
     * 更新订单支付成功
     * @param id 订单ID
     * @param payState 更新状态
     * @param payOrderId 支付订单编号
     * @param payType 支付类型
     * @param payTime 支付时间
     * @return
     */
    public int paySuccess(@Param("id") Long id, @Param("payState") Integer payState, @Param("payOrderId") Long payOrderId, @Param("payType") String payType, @Param("payTime") LocalDateTime payTime);

    /**
     * 取消订单
     * @param id
     * @return
     */
    public int cancel(Long id);

}
